import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { knowledge, system, aiqa ,resource} from '@/api/apiModulesType';


// 获取ocr类型
export const apiOcrGetOcr = (): AxiosPromise<any[]> => {
    return request({
        url: `/${resource}/ocr/getOcr`,
        method: 'get',
    });
}
// 上传识别文件
export const apiOcrGetUpload = (data?: any): AxiosPromise<any[]> => {
    return request({
        url: `/${resource}/ocr/upload`,
        method: 'post',
        data: data
    });
}
// 持续获取ocr识别结果
export const apiOcrGetUploadStatus = (params?: any): AxiosPromise<any[]> => {
    return request({
        url: `/${resource}/ocr/status`,
        method: 'get',
        params: params
    });
}
// 导入知识库
export const apiOcrToLibrany = (data?: any): AxiosPromise<any[]> => {
    return request({
        url: `/${resource}/ocr/toLibrary`,
        method: 'post',
        data: data
    });
}